#include <stdio.h>

double max(double a, double b, double c) {
    return (a > b ? a : b) > c ? (a > b ? a : b) : c;
}

double min(double a, double b, double c) {
    return (a < b ? a : b) < c ? (a < b ? a : b) : c;
}

int main() {
    double red, green, blue;
    scanf("%lf%lf%lf", &red, &green, &blue);
    int maxValue = max(red, green, blue);
    int minValue = min(red, green, blue);
    double value = maxValue / 255.0;
    // 题目所给公式有误，value应当是max(r,g,b) / 255而非max(r,g,b)
    double saturation = value == 0 ? 0 : (maxValue - minValue) / maxValue;
    double hue;
    if (maxValue - minValue == 0) {
        hue = 0;
    }
    else {
        if (maxValue == red) {
            hue = 60.0 * (0.0 + (green - blue) / (maxValue - minValue));
        }
        if (maxValue == green) {
            hue = 60.0 * (2.0 + (blue - red) / (maxValue - minValue));
        }
        if (maxValue == blue) {
            hue = 60.0 * (4.0 + (red - green) / (maxValue - minValue));
        }
    }
    hue = hue < 0 ? hue + 360.0 : hue;
    printf("%.4lf,%.4lf%%,%.4lf%%", hue, saturation * 100.0, value * 100.0);
    // %的转义字符是%%，而非\%，这与编译器的读取处理有关
}